package com.qf.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

// 自定义的异常
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BusinessException extends RuntimeException {

    private Integer code; // 错误码

    private String msg; // 错误信息

    public BusinessException(ExceptionStatus exceptinoStatus) {
        this.code = exceptinoStatus.getCode();
        this.msg = exceptinoStatus.getRespMsg();
    }
}
